/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package java1;

/**
 *
 * @author Yu
 */
import java.io.*;
public class IO2 {

    /**
     * @param args the command line arguments
     */
   public static void main(String[] args) {
        try(FileInputStream fin = new FileInputStream("data1.txt");
            BufferedInputStream bin = new BufferedInputStream(fin);
            DataInputStream din = new  DataInputStream(bin);   ){
            System.out.println( din.readInt());
            System.out.println( din.readBoolean() );
            System.out.println( din.readUTF() );
        }catch(Exception e){
            e.printStackTrace();
        }
        
        
        
    }
    
}
